package demo11.gumballstate;

public class NoQuarterState implements State {
	GumballMachine gumballMachine;
	 
    public NoQuarterState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }
 
	public void insertQuarter() {
		System.out.println("你投入了25分");
		gumballMachine.setState(gumballMachine.getHasQuarterState());
	}
 
	public void ejectQuarter() {
		System.out.println("你没有插入 25分");
	}
 
	public void turnCrank() {
		System.out.println("你转动摇杆，但是没有投入25分");
	 }
 
	public void dispense() {
		System.out.println("首先请先投入25分");
	} 
	
	public void refill() { }
 
	public String toString() {
		return "等待投入25分";
	}

}
